<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'form_booking',
	'enableAjaxValidation'=>false,
)); ?>
<h2><?php echo Yii::t('main', 'Book it'); ?></h2>
	<div class="cl">
		<div class="col1 fl">
			<div class="row cl">
				<?php echo $form->labelEx($booked,'first_name'); ?>
				<div class="inp_text">
					<?php echo $form->textField($booked,'first_name',array('maxlength'=>255)); ?>
					<?php echo $form->error($booked,'first_name'); ?>
				</div>
			</div>
			<div class="row cl">
				<?php echo $form->labelEx($booked,'last_name'); ?>
				<div class="inp_text">
					<?php echo $form->textField($booked,'last_name',array('maxlength'=>255)); ?>
					<?php echo $form->error($booked,'last_name'); ?>
				</div>
			</div>
			
			<div class="row cl">
				<?php echo $form->labelEx($booked,'comment'); ?>
				<div class="textarea">
					<?php echo $form->textArea($booked,'comment',array('rows'=>6)); ?>
					<?php echo $form->error($booked,'comment'); ?>
				</div>
			</div>

			<input type="hidden" name="object_id" value="<?php echo $object_id; ?>" />
			<input type="hidden" name="booked_id" value="<?php echo $booked->id; ?>" />

			<div class="btn blue br3 fl">
				<?php echo CHtml::submitButton($booked->isNewRecord ? 'Continue' : 'Save'); ?>
				<?php //echo CHtml::submitButton('Book It'); ?>
			</div>
		</div>
		<div class="col2">
			<div class="row">
				<?php echo $form->labelEx($booked,'total_price'); ?>
				<label for=""><?php echo CHtml::encode($booked->total_price); ?></label>
			</div>
			<div class="row">
				<?php echo $form->labelEx($booked,'guest'); ?>
				<label for=""><?php echo CHtml::encode($booked->guest); ?></label>
			</div>
		</div>
		
	</div>

	<pre>
	<a href="<?php echo Yii::app()->createUrl('paypal/Buy',array('theTotal'=>$booked->total_price)); ?>">Kup teraz</a>
	</pre>
<?php $this->endWidget(); ?>